//using ExecutiveDashboard_SL1.Web.DomainServices;
using System;

namespace ExecutiveDashboard_SL1
{
    /// <summary>
    /// a wrapper class over SalesAmountExtract needed to expose decimal type properties as double
    /// </summary>
    public class SalesAmountExtractWrapper
    {
       // private SalesAmountExtract salesAmountExtract;

        public SalesAmountExtractWrapper()
        {
           // this.salesAmountExtract = sae;
        }

        public DateTime StartDate
        {
            get
            {
               return  DateTime.Now; // return this.salesAmountExtract.StartDate;
            }
        }
        
        public DateTime EndDate
        {
            get
            {
                return DateTime.Now.AddDays(-60);
            }
        }

        public double ActualValue
        {
            get
            {
                return 10; //(double)this.salesAmountExtract.ActualValue;
            }
        }

        public double? TargetValue
        {
            get
            {
                return 10;
                //if (this.salesAmountExtract.TargetValue == 0) return null;
                //return (double)this.salesAmountExtract.TargetValue;
            }
        }

        public double Profit
        {
            get
            {
                return this.ActualValue - (this.TargetValue.HasValue ? this.TargetValue.Value : 0);
            }
        }
    }
}